import { Controller, Get, Injectable, Post, Req } from "@nestjs/common";
import { AxiosResponse } from "axios";
import { Request, Response } from "express";
import { ProxyService } from "../../service/proxy.service";
import { Observable } from "rxjs";
import { Cat } from "../../interfaces/Cat";
import { map } from "rxjs/operators";

@Controller("/cas")
export class CasController {

  constructor(private readonly proxyService: ProxyService) {
  }

  /**
   *
   */
  @Get("*")
  async create(@Req() request: Request) {
    const result = await this.proxyService.proxyAll(request).toPromise();
    return result.data;
  }
}
